export class Util {
    /**
     * ','字串转为数字数组
     * @demo "1,2,3,4,5"=>[1,2,3,4,5]
     * @param {string} str 字串
     * @param {number} duration 针对持续时间,可*1000
     */
    public static _stringToArrayByComma(str: string,duration?:number) : number[]{
        if(!str){
            return
        }
        let arr: number[] = str.split(",").map(s => Number(s.trim())*(duration?duration:1));
        return arr;
    }
}
